<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>常见问题</title>
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <style>
        * {
            background: #e9e9e9;
        }

        .opinion {
            position: absolute;
            right: 40px;
            top: 39px;
            background: #ea5718;
            border: 1px solid #ea5718;
            outline: medium;
            color: #fff;
        }

        .fff {
            height: 4px;
            background: #fff;
        }

        .question {
            height: 36px;
            line-height: 36px;
            padding-left: 26px;
            font-size: 17px;
            background: #d1d1d1;
        }

        li {
            background: #fff;
            border-bottom: 3px solid #d7d6d5;
            line-height: 40px;
            padding-left: 43px;
        }
    </style>
</head>

<body>
    <div id="vm">
        <div class="big-box">
            <div class="fff"></div>
            <div class="question">常见问题</div>
            <ul v-for="item in messagelist">
              <li  v-on:click="OpenProblemDetailWin(item)">{{questionshow(item.question)}}</li>
            </ul>
        </div>
  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/rest.js"></script>
<script type="text/javascript" src="../../script/vue.2.5.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/faskclick.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: '#vm',
        data: {
            messagelist: [],
        },
        created: function() {
            var _this = this;
            apiready = function() {
                _this.init();
                api.parseTapmode();
                uid = $api.getStorage('uid');
                session = $api.getStorage('session');
                if ('addEventListener' in document) {
                    document.addEventListener('DOMContentLoaded', function() {
                        FastClick.attach(document.body);
                    }, false);
                }
            }
        },
        methods: {
            init: function() {
                var _this = this;
                new rest().post('getqaList').datae().success(function(res) {
                    if (res.flag == 1) {
                        _this.messagelist = res.msg;
                        console.log(JSON.stringify(_this.messagelist))
                    } else {
                        api.toast({
                            msg: res.msg,
                            duration: 2000,
                            location: 'middle'
                        });
                    }
                }).error(function(err) {
                    console.log(JSON.stringify(err))
                }).run()
            },
            questionshow(questiontitile){
              return questiontitile.substr(0,20)
            },
            OpenProblemDetailWin: function(problemdetail) {
                api.openWin({
                  name: 'verifyissue',
                  url: './verify-issue_win.html',
                  pageParam:{
                    problemdetail:problemdetail
                  },
                  animation: {
                      type: "fade", //动画类型（详见动画类型常量）
                      subType: "from_right", //动画子类型（详见动画子类型常量）
                      duration: 300 //动画过渡时间，默认300毫秒
                  }
                });
              }
            }
    })

</script>

</html>
